<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8" />
    <title>确认订单</title>
    <link rel="stylesheet" href="../css/step3-firm-order.css" />
   	<script src="/js/jquery.min.js"></script>
    
	<script type="text/javascript">
		var saveOrder = function(){
			
			var courseIds = ""
			
			$("[name='courseArrangeId']").each(function(){
				
				courseIds += $(this).val() + ",";
			})
			courseIds=(courseIds.substring(courseIds.length-1)==',')?courseIds.substring(0,courseIds.length-1):courseIds;
				
			window.location.href="/course/saveOrder?arrangIds="+courseIds;
			
		}
	</script>

</head>
<body>
    <!--确认订单开始-->
<div class="firm-order-box">
    <div class="school-flows">
        <div class="school-f-1">第一步：选择校区</div>
        <div class="school-f-2">第二步：选择课程</div>
        <div class="school-f-3">第三步：确认订单</div>
        <div class="school-f-4">第四步：支付订单</div>
    </div>

    <table class="f-o-table">
        <tbody>
        <tr>
            <th>时间</th>
            <th>课程名称</th>
            <th>授课老师</th>
        </tr>
        <tr th:each="course,listStat:${courseVoList}">
            <td>
	            <span th:text="${course.courseTimeStart}"></span>
    			-
    			<span th:text="${course.courseTimeEnd}"></span>
            </td>
            <td>
            	<input type="hidden" name="courseArrangeId" th:attr="value=${course.courseArrangeId}"/>
			    <span th:text="${course.courseName }"></span>
			    <br/>
			    <span th:text="${course.courseCode }"></span>
            </td>
            <td>
            	<span th:text="${course.teacherFirstName }"></span>&nbsp;
			    <span th:text="${course.teacherLastName }"></span>
			    <br/>
			    <span th:text="${course.teacherSchoolName }"></span>
            </td>
        </tr>
        </tbody>
    </table>
    <div style="float: right;">
    	<span >订单总价</span>
    	<span th:text="${totalPrice}"></span>
    </div>
    
    <div class="f-o-next">
        <a href="javascript:saveOrder()">下一步>></a>
    </div>
</div>

</body>
</html>